home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1989 …il & Dave's Excellent CD / Excellent CD HFS.raw / Moof / Goodies / MPW Goodies / Interfaces / PInterfaces / Quickdraw.p < prev    next >
Encoding:
Text File  |  1988-11-30  |  28.8 KB  |  920 lines  |  [TEXT/MPS ]

  1. {
  2. Created: Saturday, October 15, 1988 at 5:37 AM
  3.     Quickdraw.p
  4.     Pascal Interface to the Macintosh Libraries
  5.  
  6.     Copyright Apple Computer, Inc.  1985-1988
  7.     All rights reserved
  8. }
  9.  
  10.  
  11. {$IFC UNDEFINED UsingIncludes}
  12. {$SETC UsingIncludes := 0}
  13. {$ENDC}
  14.  
  15. {$IFC NOT UsingIncludes}
  16.     UNIT Quickdraw;
  17.     INTERFACE
  18. {$ENDC}
  19.  
  20. {$IFC UNDEFINED UsingQuickdraw}
  21. {$SETC UsingQuickdraw := 1}
  22.  
  23. {$I+}
  24. {$SETC QuickdrawIncludes := UsingIncludes}
  25. {$SETC UsingIncludes := 1}
  26. {$IFC UNDEFINED UsingTypes}
  27. {$I $$Shell(PInterfaces)Types.p}
  28. {$ENDC}
  29. {$SETC UsingIncludes := QuickdrawIncludes}
  30.  
  31. CONST
  32. invalColReq = -1;                           {invalid color table request}
  33. srcCopy = 0;                                {the 16 transfer modes}
  34. srcOr = 1;
  35. srcXor = 2;
  36. srcBic = 3;
  37. notSrcCopy = 4;
  38. notSrcOr = 5;
  39. notSrcXor = 6;
  40. notSrcBic = 7;
  41. patCopy = 8;
  42. patOr = 9;
  43. patXor = 10;
  44. patBic = 11;
  45. notPatCopy = 12;
  46. notPatOr = 13;
  47. notPatXor = 14;
  48. notPatBic = 15;
  49.  
  50. { Arithmetic transfer modes }
  51.  
  52. blend = 32;
  53. addPin = 33;
  54. addOver = 34;
  55. subPin = 35;
  56. addMax = 37;
  57. subOver = 38;
  58. adMin = 39;
  59.  
  60. { Transparent mode constant }
  61.  
  62. transparent = 36;
  63.  
  64. { QuickDraw color separation constants
  65.  
  66.  }
  67.  
  68. normalBit = 0;                              {normal screen mapping}
  69. inverseBit = 1;                             {inverse screen mapping}
  70. redBit = 4;                                 {RGB additive mapping}
  71. greenBit = 3;
  72. blueBit = 2;
  73. cyanBit = 8;                                {CMYBk subtractive mapping}
  74. magentaBit = 7;
  75. yellowBit = 6;
  76. blackBit = 5;
  77. blackColor = 33;                            {colors expressed in these mappings}
  78. whiteColor = 30;
  79. redColor = 205;
  80. greenColor = 341;
  81. blueColor = 409;
  82. cyanColor = 273;
  83. magentaColor = 137;
  84. yellowColor = 69;
  85. picLParen = 0;                              {standard picture comments}
  86. picRParen = 1;
  87. clutType = 0;                               {0 if lookup table}
  88. fixedType = 1;                              {1 if fixed table}
  89. directType = 2;                             {2 if direct values}
  90. gdDevType = 0;                              {0 = monochrome 1 = color}
  91. ramInit = 10;                               {1 if initialized from 'scrn' resource}
  92. mainScreen = 11;                            { 1 if main screen }
  93. allInit = 12;                               { 1 if all devices initialized }
  94. screenDevice = 13;                          {1 if screen device [not used]}
  95. noDriver = 14;                              { 1 if no driver for this GDevice }
  96. screenActive = 15;                          {1 if in use}
  97. hiliteBit = 7;                              {flag bit in HiliteMode (lowMem flag)}
  98. pHiliteBit = 0;                             {flag bit in HiliteMode used with BitClr procedure}
  99. defQDColors = 127;                          {resource ID of clut for default QDColors}
  100.  
  101.  
  102. TYPE
  103.  
  104. GrafVerb = (frame,paint,erase,invert,fill);
  105.  
  106. StyleItem = (bold,italic,underline,outline,shadow,condense,extend);
  107.  
  108.  
  109. QDByte = SignedByte;
  110.  
  111. QDPtr = Ptr;                                { blind pointer }
  112.  
  113. QDHandle = Handle;                          { blind handle }
  114.  
  115. QDErr = INTEGER;
  116.  
  117. PatPtr = ^Pattern;
  118. PatHandle = ^PatPtr;
  119.  
  120. Pattern = PACKED ARRAY [0..7] OF 0..255;
  121.  
  122. Bits16 = ARRAY [0..15] OF INTEGER;
  123.  
  124. Style = SET OF StyleItem;
  125.  
  126. FontInfo = RECORD
  127.     ascent: INTEGER;
  128.     descent: INTEGER;
  129.     widMax: INTEGER;
  130.     leading: INTEGER;
  131.     END;
  132.  
  133. BitMap = RECORD
  134.     baseAddr: Ptr;
  135.     rowBytes: INTEGER;
  136.     bounds: Rect;
  137.     END;
  138.  
  139. CursPtr = ^Cursor;
  140. CursHandle = ^CursPtr;
  141. Cursor = RECORD
  142.     data: Bits16;
  143.     mask: Bits16;
  144.     hotSpot: Point;
  145.     END;
  146.  
  147. PenState = RECORD
  148.     pnLoc: Point;
  149.     pnSize: Point;
  150.     pnMode: INTEGER;
  151.     pnPat: Pattern;
  152.     END;
  153.  
  154. RgnPtr = ^Region;
  155. RgnHandle = ^RgnPtr;
  156. Region = RECORD
  157.     rgnSize: INTEGER;                       {size in bytes}
  158.     rgnBBox: Rect;                          {enclosing rectangle}
  159.     END;
  160.  
  161. PicPtr = ^Picture;
  162. PicHandle = ^PicPtr;
  163. Picture = RECORD
  164.     picSize: INTEGER;
  165.     picFrame: Rect;
  166.     END;
  167.  
  168. PolyPtr = ^Polygon;
  169. PolyHandle = ^PolyPtr;
  170. Polygon = RECORD
  171.     polySize: INTEGER;
  172.     polyBBox: Rect;
  173.     polyPoints: ARRAY [0..0] OF Point;
  174.     END;
  175.  
  176. QDProcsPtr = ^QDProcs;
  177. QDProcs = RECORD
  178.     textProc: Ptr;
  179.     lineProc: Ptr;
  180.     rectProc: Ptr;
  181.     rRectProc: Ptr;
  182.     ovalProc: Ptr;
  183.     arcProc: Ptr;
  184.     polyProc: Ptr;
  185.     rgnProc: Ptr;
  186.     bitsProc: Ptr;
  187.     commentProc: Ptr;
  188.     txMeasProc: Ptr;
  189.     getPicProc: Ptr;
  190.     putPicProc: Ptr;
  191.     END;
  192.  
  193. GrafPtr = ^GrafPort;
  194. GrafPort = RECORD
  195.     device: INTEGER;
  196.     portBits: BitMap;
  197.     portRect: Rect;
  198.     visRgn: RgnHandle;
  199.     clipRgn: RgnHandle;
  200.     bkPat: Pattern;
  201.     fillPat: Pattern;
  202.     pnLoc: Point;
  203.     pnSize: Point;
  204.     pnMode: INTEGER;
  205.     pnPat: Pattern;
  206.     pnVis: INTEGER;
  207.     txFont: INTEGER;
  208.     txFace: Style;                          {txFace is unpacked byte but push as short}
  209.     txMode: INTEGER;
  210.     txSize: INTEGER;
  211.     spExtra: Fixed;
  212.     fgColor: LONGINT;
  213.     bkColor: LONGINT;
  214.     colrBit: INTEGER;
  215.     patStretch: INTEGER;
  216.     picSave: Handle;
  217.     rgnSave: Handle;
  218.     polySave: Handle;
  219.     grafProcs: QDProcsPtr;
  220.     END;
  221.  
  222. WindowPtr = GrafPtr;
  223.  
  224. RGBColor = RECORD
  225.     red: INTEGER;                           {magnitude of red component}
  226.     green: INTEGER;                         {magnitude of green component}
  227.     blue: INTEGER;                          {magnitude of blue component}
  228.     END;
  229.  
  230. ColorSpec = RECORD
  231.     value: INTEGER;                         {index or other value}
  232.     rgb: RGBColor;                          {true color}
  233.     END;
  234.  
  235. CSpecArray = ARRAY [0..0] OF ColorSpec;
  236.  
  237. CTabPtr = ^ColorTable;
  238. CTabHandle = ^CTabPtr;
  239. ColorTable = RECORD
  240.     ctSeed: LONGINT;                        {unique identifier for table}
  241.     ctFlags: INTEGER;                       {high bit: 0 = PixMap; 1 = device}
  242.     ctSize: INTEGER;                        {number of entries in CTTable}
  243.     ctTable: CSpecArray;                    {array [0..0] of ColorSpec}
  244.     END;
  245.  
  246. MatchRec = RECORD
  247.     red: INTEGER;
  248.     green: INTEGER;
  249.     blue: INTEGER;
  250.     matchData: LONGINT;
  251.     END;
  252.  
  253. PixMapPtr = ^PixMap;
  254. PixMapHandle = ^PixMapPtr;
  255. PixMap = RECORD
  256.     baseAddr: Ptr;                          {pointer to pixels}
  257.     rowBytes: INTEGER;                      {offset to next line}
  258.     bounds: Rect;                           {encloses bitmap}
  259.     pmVersion: INTEGER;                     {pixMap version number}
  260.     packType: INTEGER;                      {defines packing format}
  261.     packSize: LONGINT;                      {length of pixel data}
  262.     hRes: Fixed;                            {horiz. resolution (ppi)}
  263.     vRes: Fixed;                            {vert. resolution (ppi)}
  264.     pixelType: INTEGER;                     {defines pixel type}
  265.     pixelSize: INTEGER;                     {# bits in pixel}
  266.     cmpCount: INTEGER;                      {# components in pixel}
  267.     cmpSize: INTEGER;                       {# bits per component}
  268.     planeBytes: LONGINT;                    {offset to next plane}
  269.     pmTable: CTabHandle;                    {color map for this pixMap}
  270.     pmReserved: LONGINT;                    {for future use. MUST BE 0}
  271.     END;
  272.  
  273. PixPatPtr = ^PixPat;
  274. PixPatHandle = ^PixPatPtr;
  275. PixPat = RECORD
  276.     patType: INTEGER;                       {type of pattern}
  277.     patMap: PixMapHandle;                   {the pattern's pixMap}
  278.     patData: Handle;                        {pixmap's data}
  279.     patXData: Handle;                       {expanded Pattern data}
  280.     patXValid: INTEGER;                     {flags whether expanded Pattern valid}
  281.     patXMap: Handle;                        {Handle to expanded Pattern data}
  282.     pat1Data: Pattern;                      {old-Style pattern/RGB color}
  283.     END;
  284.  
  285. CCrsrPtr = ^CCrsr;
  286. CCrsrHandle = ^CCrsrPtr;
  287. CCrsr = RECORD
  288.     crsrType: INTEGER;                      {type of cursor}
  289.     crsrMap: PixMapHandle;                  {the cursor's pixmap}
  290.     crsrData: Handle;                       {cursor's data}
  291.     crsrXData: Handle;                      {expanded cursor data}
  292.     crsrXValid: INTEGER;                    {depth of expanded data (0 if none)}
  293.     crsrXHandle: Handle;                    {future use}
  294.     crsr1Data: Bits16;                      {one-bit cursor}
  295.     crsrMask: Bits16;                       {cursor's mask}
  296.     crsrHotSpot: Point;                     {cursor's hotspot}
  297.     crsrXTable: LONGINT;                    {private}
  298.     crsrID: LONGINT;                        {private}
  299.     END;
  300.  
  301. CIconPtr = ^CIcon;
  302. CIconHandle = ^CIconPtr;
  303. CIcon = RECORD
  304.     iconPMap: PixMap;                       {the icon's pixMap}
  305.     iconMask: BitMap;                       {the icon's mask}
  306.     iconBMap: BitMap;                       {the icon's bitMap}
  307.     iconData: Handle;                       {the icon's data}
  308.     iconMaskData: ARRAY [0..0] OF INTEGER;  {icon's mask and BitMap data}
  309.     END;
  310.  
  311. GammaTblPtr = ^GammaTbl;
  312. GammaTblHandle = ^GammaTblPtr;
  313. GammaTbl = RECORD
  314.     gVersion: INTEGER;                      {gamma version number}
  315.     gType: INTEGER;                         {gamma data type}
  316.     gFormulaSize: INTEGER;                  {Formula data size}
  317.     gChanCnt: INTEGER;                      {number of channels of data}
  318.     gDataCnt: INTEGER;                      {number of values/channel}
  319.     gDataWidth: INTEGER;                    {bits/corrected value (data packed to next larger byte size)}
  320.     gFormulaData: ARRAY [0..0] OF INTEGER;  {data for formulas followed by gamma values}
  321.     END;
  322.  
  323. ITabPtr = ^ITab;
  324. ITabHandle = ^ITabPtr;
  325. ITab = RECORD
  326.     iTabSeed: LONGINT;                      {copy of CTSeed from source CTable}
  327.     iTabRes: INTEGER;                       {bits/channel resolution of iTable}
  328.     iTTable: ARRAY [0..0] OF SignedByte;    {byte colortable index values}
  329.     END;
  330.  
  331. SProcPtr = ^SProcRec;
  332. SProcHndl = ^SProcPtr;
  333. SProcRec = RECORD
  334.     nxtSrch: Handle;                        {Handle to next SProcRec}
  335.     srchProc: ProcPtr;                      {pointer to search procedure}
  336.     END;
  337.  
  338. CProcPtr = ^CProcRec;
  339. CProcHndl = ^CProcPtr;
  340. CProcRec = RECORD
  341.     nxtComp: CProcHndl;                     {CProcHndl Handle to next CProcRec}
  342.     compProc: ProcPtr;                      {pointer to complement procedure}
  343.     END;
  344.  
  345. GDPtr = ^GDevice;
  346. GDHandle = ^GDPtr;
  347. GDevice = RECORD
  348.     gdRefNum: INTEGER;                      {driver's unit number}
  349.     gdID: INTEGER;                          {client ID for search procs}
  350.     gdType: INTEGER;                        {fixed/CLUT/direct}
  351.     gdITable: ITabHandle;                   {Handle to inverse lookup table}
  352.     gdResPref: INTEGER;                     {preferred resolution of GDITable}
  353.     gdSearchProc: SProcHndl;                {search proc list head}
  354.     gdCompProc: CProcHndl;                  {complement proc list}
  355.     gdFlags: INTEGER;                       {grafDevice flags word}
  356.     gdPMap: PixMapHandle;                   {describing pixMap}
  357.     gdRefCon: LONGINT;                      {reference value}
  358.     gdNextGD: GDHandle;                     {GDHandle Handle of next gDevice}
  359.     gdRect: Rect;                           { device's bounds in global coordinates}
  360.     gdMode: LONGINT;                        {device's current mode}
  361.     gdCCBytes: INTEGER;                     {depth of expanded cursor data}
  362.     gdCCDepth: INTEGER;                     {depth of expanded cursor data}
  363.     gdCCXData: Handle;                      {Handle to cursor's expanded data}
  364.     gdCCXMask: Handle;                      {Handle to cursor's expanded mask}
  365.     gdReserved: LONGINT;                    {future use. MUST BE 0}
  366.     END;
  367.  
  368. GVarPtr = ^GrafVars;
  369. GVarHandle = ^GVarPtr;
  370. GrafVars = RECORD
  371.     rgbOpColor: RGBColor;                   {color for addPin  subPin and average}
  372.     rgbHiliteColor: RGBColor;               {color for hiliting}
  373.     pmFgColor: Handle;                      {palette Handle for foreground color}
  374.     pmFgIndex: INTEGER;                     {index value for foreground}
  375.     pmBkColor: Handle;                      {palette Handle for background color}
  376.     pmBkIndex: INTEGER;                     {index value for background}
  377.     pmFlags: INTEGER;                       {flags for Palette Manager}
  378.     END;
  379.  
  380. CGrafPtr = ^CGrafPort;
  381. CGrafPort = RECORD
  382.     device: INTEGER;
  383.     portPixMap: PixMapHandle;               {port's pixel map}
  384.     portVersion: INTEGER;                   {high 2 bits always set}
  385.     grafVars: Handle;                       {Handle to more fields}
  386.     chExtra: INTEGER;                       {character extra}
  387.     pnLocHFrac: INTEGER;                    {pen fraction}
  388.     portRect: Rect;
  389.     visRgn: RgnHandle;
  390.     clipRgn: RgnHandle;
  391.     bkPixPat: PixPatHandle;                 {background pattern}
  392.     rgbFgColor: RGBColor;                   {RGB components of fg}
  393.     rgbBkColor: RGBColor;                   {RGB components of bk}
  394.     pnLoc: Point;
  395.     pnSize: Point;
  396.     pnMode: INTEGER;
  397.     pnPixPat: PixPatHandle;                 {pen's pattern}
  398.     fillPixPat: PixPatHandle;               {fill pattern}
  399.     pnVis: INTEGER;
  400.     txFont: INTEGER;
  401.     txFace: Style;                          {txFace is unpacked byte  push as short}
  402.     txMode: INTEGER;
  403.     txSize: INTEGER;
  404.     spExtra: Fixed;
  405.     fgColor: LONGINT;
  406.     bkColor: LONGINT;
  407.     colrBit: INTEGER;
  408.     patStretch: INTEGER;
  409.     picSave: Handle;
  410.     rgnSave: Handle;
  411.     polySave: Handle;
  412.     grafProcs: QDProcsPtr;
  413.     END;
  414.  
  415. CWindowPtr = CGrafPtr;
  416.  
  417. CQDProcsPtr = ^CQDProcs;
  418. CQDProcs = RECORD
  419.     textProc: Ptr;
  420.     lineProc: Ptr;
  421.     rectProc: Ptr;
  422.     rRectProc: Ptr;
  423.     ovalProc: Ptr;
  424.     arcProc: Ptr;
  425.     polyProc: Ptr;
  426.     rgnProc: Ptr;
  427.     bitsProc: Ptr;
  428.     commentProc: Ptr;
  429.     txMeasProc: Ptr;
  430.     getPicProc: Ptr;
  431.     putPicProc: Ptr;
  432.     opcodeProc: Ptr;                        {fields added to QDProcs}
  433.     newProc1: Ptr;
  434.     newProc2: Ptr;
  435.     newProc3: Ptr;
  436.     newProc4: Ptr;
  437.     newProc5: Ptr;
  438.     newProc6: Ptr;
  439.     END;
  440.  
  441. ReqListRec = RECORD
  442.     reqLSize: INTEGER;                      {request list size}
  443.     reqLData: ARRAY [0..0] OF INTEGER;      {request list data}
  444.     END;
  445.  
  446. VAR
  447. {$PUSH}
  448. {$J+}
  449.     thePort: GrafPtr;
  450.     white: Pattern;
  451.     black: Pattern;
  452.     gray: Pattern;
  453.     ltGray: Pattern;
  454.     dkGray: Pattern;
  455.     arrow: Cursor;
  456.     screenBits: BitMap;
  457.     randSeed: LONGINT;
  458. {$POP}
  459.  
  460.  
  461.  
  462. PROCEDURE InitGraf(globalPtr: Ptr);
  463.     INLINE $A86E;
  464. PROCEDURE OpenPort(port: GrafPtr);
  465.     INLINE $A86F;
  466. PROCEDURE InitPort(port: GrafPtr);
  467.     INLINE $A86D;
  468. PROCEDURE ClosePort(port: GrafPtr);
  469.     INLINE $A87D;
  470. PROCEDURE SetPort(port: GrafPtr);
  471.     INLINE $A873;
  472. PROCEDURE GetPort(VAR port: GrafPtr);
  473.     INLINE $A874;
  474. PROCEDURE GrafDevice(device: INTEGER);
  475.     INLINE $A872;
  476. PROCEDURE SetPortBits(bm: BitMap);
  477.     INLINE $A875;
  478. PROCEDURE PortSize(width: INTEGER;height: INTEGER);
  479.     INLINE $A876;
  480. PROCEDURE MovePortTo(leftGlobal: INTEGER;topGlobal: INTEGER);
  481.     INLINE $A877;
  482. PROCEDURE SetOrigin(h: INTEGER;v: INTEGER);
  483.     INLINE $A878;
  484. PROCEDURE SetClip(rgn: RgnHandle);
  485.     INLINE $A879;
  486. PROCEDURE GetClip(rgn: RgnHandle);
  487.     INLINE $A87A;
  488. PROCEDURE ClipRect(r: Rect);
  489.     INLINE $A87B;
  490. PROCEDURE BackPat(pat: Pattern);
  491.     INLINE $A87C;
  492. PROCEDURE InitCursor;
  493.     INLINE $A850;
  494. PROCEDURE SetCursor(crsr: Cursor);
  495.     INLINE $A851;
  496. PROCEDURE HideCursor;
  497.     INLINE $A852;
  498. PROCEDURE ShowCursor;
  499.     INLINE $A853;
  500. PROCEDURE ObscureCursor;
  501.     INLINE $A856;
  502. PROCEDURE HidePen;
  503.     INLINE $A896;
  504. PROCEDURE ShowPen;
  505.     INLINE $A897;
  506. PROCEDURE GetPen(VAR pt: Point);
  507.     INLINE $A89A;
  508. PROCEDURE GetPenState(VAR pnState: PenState);
  509.     INLINE $A898;
  510. PROCEDURE SetPenState(pnState: PenState);
  511.     INLINE $A899;
  512. PROCEDURE PenSize(width: INTEGER;height: INTEGER);
  513.     INLINE $A89B;
  514. PROCEDURE PenMode(mode: INTEGER);
  515.     INLINE $A89C;
  516. PROCEDURE PenPat(pat: Pattern);
  517.     INLINE $A89D;
  518. PROCEDURE PenNormal;
  519.     INLINE $A89E;
  520. PROCEDURE MoveTo(h: INTEGER;v: INTEGER);
  521.     INLINE $A893;
  522. PROCEDURE Move(dh: INTEGER;dv: INTEGER);
  523.     INLINE $A894;
  524. PROCEDURE LineTo(h: INTEGER;v: INTEGER);
  525.     INLINE $A891;
  526. PROCEDURE Line(dh: INTEGER;dv: INTEGER);
  527.     INLINE $A892;
  528. PROCEDURE TextFont(font: INTEGER);
  529.     INLINE $A887;
  530. PROCEDURE TextFace(face: Style);
  531.     INLINE $A888;
  532. PROCEDURE TextMode(mode: INTEGER);
  533.     INLINE $A889;
  534. PROCEDURE TextSize(size: INTEGER);
  535.     INLINE $A88A;
  536. PROCEDURE SpaceExtra(extra: Fixed);
  537.     INLINE $A88E;
  538. PROCEDURE DrawChar(ch: CHAR);
  539.     INLINE $A883;
  540. PROCEDURE DrawString(s: Str255);
  541.     INLINE $A884;
  542. PROCEDURE DrawText(textBuf: Ptr;firstByte: INTEGER;byteCount: INTEGER);
  543.     INLINE $A885;
  544. FUNCTION CharWidth(ch: CHAR): INTEGER;
  545.     INLINE $A88D;
  546. FUNCTION StringWidth(s: Str255): INTEGER;
  547.     INLINE $A88C;
  548. FUNCTION TextWidth(textBuf: Ptr;firstByte: INTEGER;byteCount: INTEGER): INTEGER;
  549.     INLINE $A886;
  550. PROCEDURE MeasureText(count: INTEGER;textAddr: Ptr;charLocs: Ptr);
  551.     INLINE $A837;
  552. PROCEDURE GetFontInfo(VAR info: FontInfo);
  553.     INLINE $A88B;
  554. PROCEDURE ForeColor(color: LONGINT);
  555.     INLINE $A862;
  556. PROCEDURE BackColor(color: LONGINT);
  557.     INLINE $A863;
  558. PROCEDURE ColorBit(whichBit: INTEGER);
  559.     INLINE $A864;
  560. PROCEDURE SetRect(VAR r: Rect;left: INTEGER;top: INTEGER;right: INTEGER;
  561.     bottom: INTEGER);
  562.     INLINE $A8A7;
  563. PROCEDURE OffsetRect(VAR r: Rect;dh: INTEGER;dv: INTEGER);
  564.     INLINE $A8A8;
  565. PROCEDURE InsetRect(r: Rect;dh: INTEGER;dv: INTEGER);
  566.     INLINE $A8A9;
  567. FUNCTION SectRect(src1: Rect;src2: Rect;VAR dstRect: Rect): BOOLEAN;
  568.     INLINE $A8AA;
  569. PROCEDURE UnionRect(src1: Rect;src2: Rect;VAR dstRect: Rect);
  570.     INLINE $A8AB;
  571. FUNCTION EqualRect(rect1: Rect;rect2: Rect): BOOLEAN;
  572.     INLINE $A8A6;
  573. FUNCTION EmptyRect(r: Rect): BOOLEAN;
  574.     INLINE $A8AE;
  575. PROCEDURE FrameRect(r: Rect);
  576.     INLINE $A8A1;
  577. PROCEDURE PaintRect(r: Rect);
  578.     INLINE $A8A2;
  579. PROCEDURE EraseRect(r: Rect);
  580.     INLINE $A8A3;
  581. PROCEDURE InvertRect(r: Rect);
  582.     INLINE $A8A4;
  583. PROCEDURE FillRect(r: Rect;pat: Pattern);
  584.     INLINE $A8A5;
  585. PROCEDURE FrameOval(r: Rect);
  586.     INLINE $A8B7;
  587. PROCEDURE PaintOval(r: Rect);
  588.     INLINE $A8B8;
  589. PROCEDURE EraseOval(r: Rect);
  590.     INLINE $A8B9;
  591. PROCEDURE InvertOval(r: Rect);
  592.     INLINE $A8BA;
  593. PROCEDURE FillOval(r: Rect;pat: Pattern);
  594.     INLINE $A8BB;
  595. PROCEDURE FrameRoundRect(r: Rect;ovalWidth: INTEGER;ovalHeight: INTEGER);
  596.     INLINE $A8B0;
  597. PROCEDURE PaintRoundRect(r: Rect;ovalWidth: INTEGER;ovalHeight: INTEGER);
  598.     INLINE $A8B1;
  599. PROCEDURE EraseRoundRect(r: Rect;ovalWidth: INTEGER;ovalHeight: INTEGER);
  600.     INLINE $A8B2;
  601. PROCEDURE InvertRoundRect(r: Rect;ovalWidth: INTEGER;ovalHeight: INTEGER);
  602.     INLINE $A8B3;
  603. PROCEDURE FillRoundRect(r: Rect;ovalWidth: INTEGER;ovalHeight: INTEGER;
  604.     pat: Pattern);
  605.     INLINE $A8B4;
  606. PROCEDURE FrameArc(r: Rect;startAngle: INTEGER;arcAngle: INTEGER);
  607.     INLINE $A8BE;
  608. PROCEDURE PaintArc(r: Rect;startAngle: INTEGER;arcAngle: INTEGER);
  609.     INLINE $A8BF;
  610. PROCEDURE EraseArc(r: Rect;startAngle: INTEGER;arcAngle: INTEGER);
  611.     INLINE $A8C0;
  612. PROCEDURE InvertArc(r: Rect;startAngle: INTEGER;arcAngle: INTEGER);
  613.     INLINE $A8C1;
  614. PROCEDURE FillArc(r: Rect;startAngle: INTEGER;arcAngle: INTEGER;pat: Pattern);
  615.     INLINE $A8C2;
  616. FUNCTION NewRgn: RgnHandle;
  617.     INLINE $A8D8;
  618. PROCEDURE OpenRgn;
  619.     INLINE $A8DA;
  620. PROCEDURE CloseRgn(dstRgn: RgnHandle);
  621.     INLINE $A8DB;
  622. PROCEDURE DisposeRgn(rgn: RgnHandle);
  623.     INLINE $A8D9;
  624. PROCEDURE CopyRgn(srcRgn: RgnHandle;dstRgn: RgnHandle);
  625.     INLINE $A8DC;
  626. PROCEDURE SetEmptyRgn(rgn: RgnHandle);
  627.     INLINE $A8DD;
  628. PROCEDURE SetRectRgn(rgn: RgnHandle;left: INTEGER;top: INTEGER;right: INTEGER;
  629.     bottom: INTEGER);
  630.     INLINE $A8DE;
  631. PROCEDURE RectRgn(rgn: RgnHandle;r: Rect);
  632.     INLINE $A8DF;
  633. PROCEDURE OffsetRgn(rgn: RgnHandle;dh: INTEGER;dv: INTEGER);
  634.     INLINE $A8E0;
  635. PROCEDURE InsetRgn(rgn: RgnHandle;dh: INTEGER;dv: INTEGER);
  636.     INLINE $A8E1;
  637. PROCEDURE SectRgn(srcRgnA: RgnHandle;srcRgnB: RgnHandle;dstRgn: RgnHandle);
  638.     INLINE $A8E4;
  639. PROCEDURE UnionRgn(srcRgnA: RgnHandle;srcRgnB: RgnHandle;dstRgn: RgnHandle);
  640.     INLINE $A8E5;
  641. PROCEDURE DiffRgn(srcRgnA: RgnHandle;srcRgnB: RgnHandle;dstRgn: RgnHandle);
  642.     INLINE $A8E6;
  643. PROCEDURE XorRgn(srcRgnA: RgnHandle;srcRgnB: RgnHandle;dstRgn: RgnHandle);
  644.     INLINE $A8E7;
  645. FUNCTION RectInRgn(r: Rect;rgn: RgnHandle): BOOLEAN;
  646.     INLINE $A8E9;
  647. FUNCTION EqualRgn(rgnA: RgnHandle;rgnB: RgnHandle): BOOLEAN;
  648.     INLINE $A8E3;
  649. FUNCTION EmptyRgn(rgn: RgnHandle): BOOLEAN;
  650.     INLINE $A8E2;
  651. PROCEDURE FrameRgn(rgn: RgnHandle);
  652.     INLINE $A8D2;
  653. PROCEDURE PaintRgn(rgn: RgnHandle);
  654.     INLINE $A8D3;
  655. PROCEDURE EraseRgn(rgn: RgnHandle);
  656.     INLINE $A8D4;
  657. PROCEDURE InvertRgn(rgn: RgnHandle);
  658.     INLINE $A8D5;
  659. PROCEDURE FillRgn(rgn: RgnHandle;pat: Pattern);
  660.     INLINE $A8D6;
  661. PROCEDURE ScrollRect(r: Rect;dh: INTEGER;dv: INTEGER;updateRgn: RgnHandle);
  662.     INLINE $A8EF;
  663. PROCEDURE CopyBits(srcBits: BitMap;dstBits: BitMap;srcRect: Rect;dstRect: Rect;
  664.     mode: INTEGER;maskRgn: RgnHandle);
  665.     INLINE $A8EC;
  666. PROCEDURE SeedFill(srcPtr: Ptr;dstPtr: Ptr;srcRow: INTEGER;dstRow: INTEGER;
  667.     height: INTEGER;words: INTEGER;seedH: INTEGER;seedV: INTEGER);
  668.     INLINE $A839;
  669. PROCEDURE CalcMask(srcPtr: Ptr;dstPtr: Ptr;srcRow: INTEGER;dstRow: INTEGER;
  670.     height: INTEGER;words: INTEGER);
  671.     INLINE $A838;
  672. PROCEDURE CopyMask(srcBits: BitMap;maskBits: BitMap;dstBits: BitMap;srcRect: Rect;
  673.     maskRect: Rect;dstRect: Rect);
  674.     INLINE $A817;
  675. FUNCTION OpenPicture(picFrame: Rect): PicHandle;
  676.     INLINE $A8F3;
  677. PROCEDURE PicComment(kind: INTEGER;dataSize: INTEGER;dataHandle: Handle);
  678.     INLINE $A8F2;
  679. PROCEDURE ClosePicture;
  680.     INLINE $A8F4;
  681. PROCEDURE DrawPicture(myPicture: PicHandle;dstRect: Rect);
  682.     INLINE $A8F6;
  683. PROCEDURE KillPicture(myPicture: PicHandle);
  684.     INLINE $A8F5;
  685. FUNCTION OpenPoly: PolyHandle;
  686.     INLINE $A8CB;
  687. PROCEDURE ClosePoly;
  688.     INLINE $A8CC;
  689. PROCEDURE KillPoly(poly: PolyHandle);
  690.     INLINE $A8CD;
  691. PROCEDURE OffsetPoly(poly: PolyHandle;dh: INTEGER;dv: INTEGER);
  692.     INLINE $A8CE;
  693. PROCEDURE FramePoly(poly: PolyHandle);
  694.     INLINE $A8C6;
  695. PROCEDURE PaintPoly(poly: PolyHandle);
  696.     INLINE $A8C7;
  697. PROCEDURE ErasePoly(poly: PolyHandle);
  698.     INLINE $A8C8;
  699. PROCEDURE InvertPoly(poly: PolyHandle);
  700.     INLINE $A8C9;
  701. PROCEDURE FillPoly(poly: PolyHandle;pat: Pattern);
  702.     INLINE $A8CA;
  703. PROCEDURE SetPt(VAR pt: Point;h: INTEGER;v: INTEGER);
  704.     INLINE $A880;
  705. PROCEDURE LocalToGlobal(VAR pt: Point);
  706.     INLINE $A870;
  707. PROCEDURE GlobalToLocal(VAR pt: Point);
  708.     INLINE $A871;
  709. FUNCTION Random: INTEGER;
  710.     INLINE $A861;
  711. PROCEDURE StuffHex(thingPtr: Ptr;s: Str255);
  712.     INLINE $A866;
  713. FUNCTION GetPixel(h: INTEGER;v: INTEGER): BOOLEAN;
  714.     INLINE $A865;
  715. PROCEDURE ScalePt(VAR pt: Point;srcRect: Rect;dstRect: Rect);
  716.     INLINE $A8F8;
  717. PROCEDURE MapPt(VAR pt: Point;srcRect: Rect;dstRect: Rect);
  718.     INLINE $A8F9;
  719. PROCEDURE MapRect(VAR r: Rect;srcRect: Rect;dstRect: Rect);
  720.     INLINE $A8FA;
  721. PROCEDURE MapRgn(rgn: RgnHandle;srcRect: Rect;dstRect: Rect);
  722.     INLINE $A8FB;
  723. PROCEDURE MapPoly(poly: PolyHandle;srcRect: Rect;dstRect: Rect);
  724.     INLINE $A8FC;
  725. PROCEDURE SetStdProcs(VAR procs: QDProcs);
  726.     INLINE $A8EA;
  727. PROCEDURE StdRect(verb: GrafVerb;r: Rect);
  728.     INLINE $A8A0;
  729. PROCEDURE StdRRect(verb: GrafVerb;r: Rect;ovalWidth: INTEGER;ovalHeight: INTEGER);
  730.     INLINE $A8AF;
  731. PROCEDURE StdOval(verb: GrafVerb;r: Rect);
  732.     INLINE $A8B6;
  733. PROCEDURE StdArc(verb: GrafVerb;r: Rect;startAngle: INTEGER;arcAngle: INTEGER);
  734.     INLINE $A8BD;
  735. PROCEDURE StdPoly(verb: GrafVerb;poly: PolyHandle);
  736.     INLINE $A8C5;
  737. PROCEDURE StdRgn(verb: GrafVerb;rgn: RgnHandle);
  738.     INLINE $A8D1;
  739. PROCEDURE StdBits(srcBits: BitMap;srcRect: Rect;dstRect: Rect;mode: INTEGER;
  740.     maskRgn: RgnHandle);
  741.     INLINE $A8EB;
  742. PROCEDURE StdComment(kind: INTEGER;dataSize: INTEGER;dataHandle: Handle);
  743.     INLINE $A8F1;
  744. FUNCTION StdTxMeas(byteCount: INTEGER;textAddr: Ptr;VAR numer: Point;VAR denom: Point;
  745.     VAR info: FontInfo): INTEGER;
  746.     INLINE $A8ED;
  747. PROCEDURE StdGetPic(dataPtr: Ptr;byteCount: INTEGER);
  748.     INLINE $A8EE;
  749. PROCEDURE StdPutPic(dataPtr: Ptr;byteCount: INTEGER);
  750.     INLINE $A8F0;
  751. PROCEDURE AddPt(src: Point;VAR dst: Point);
  752.     INLINE $A87E;
  753. FUNCTION EqualPt(pt1: Point;pt2: Point): BOOLEAN;
  754.     INLINE $A881;
  755. FUNCTION PtInRect(pt: Point;r: Rect): BOOLEAN;
  756.     INLINE $A8AD;
  757. PROCEDURE Pt2Rect(pt1: Point;pt2: Point;VAR dstRect: Rect);
  758.     INLINE $A8AC;
  759. PROCEDURE PtToAngle(r: Rect;pt: Point;VAR angle: INTEGER);
  760.     INLINE $A8C3;
  761. FUNCTION PtInRgn(pt: Point;rgn: RgnHandle): BOOLEAN;
  762.     INLINE $A8E8;
  763. PROCEDURE StdText(count: INTEGER;textAddr: Ptr;numer: Point;denom: Point);
  764.     INLINE $A882;
  765. PROCEDURE StdLine(newPt: Point);
  766.     INLINE $A890;
  767. PROCEDURE OpenCPort(port: CGrafPtr);
  768.     INLINE $AA00;
  769. PROCEDURE InitCPort(port: CGrafPtr);
  770.     INLINE $AA01;
  771. PROCEDURE CloseCPort(port: CGrafPtr);
  772.     INLINE $A87D;
  773. FUNCTION NewPixMap: PixMapHandle;
  774.     INLINE $AA03;
  775. PROCEDURE DisposPixMap(pm: PixMapHandle);
  776.     INLINE $AA04;
  777. PROCEDURE CopyPixMap(srcPM: PixMapHandle;dstPM: PixMapHandle);
  778.     INLINE $AA05;
  779. FUNCTION NewPixPat: PixPatHandle;
  780.     INLINE $AA07;
  781. PROCEDURE DisposPixPat(pp: PixPatHandle);
  782.     INLINE $AA08;
  783. PROCEDURE CopyPixPat(srcPP: PixPatHandle;dstPP: PixPatHandle);
  784.     INLINE $AA09;
  785. PROCEDURE PenPixPat(pp: PixPatHandle);
  786.     INLINE $AA0A;
  787. PROCEDURE BackPixPat(pp: PixPatHandle);
  788.     INLINE $AA0B;
  789. FUNCTION GetPixPat(patID: INTEGER): PixPatHandle;
  790.     INLINE $AA0C;
  791. PROCEDURE MakeRGBPat(pp: PixPatHandle;myColor: RGBColor);
  792.     INLINE $AA0D;
  793. PROCEDURE FillCRect(r: Rect;pp: PixPatHandle);
  794.     INLINE $AA0E;
  795. PROCEDURE FillCOval(r: Rect;pp: PixPatHandle);
  796.     INLINE $AA0F;
  797. PROCEDURE FillCRoundRect(r: Rect;ovalWidth: INTEGER;ovalHeight: INTEGER;
  798.     pp: PixPatHandle);
  799.     INLINE $AA10;
  800. PROCEDURE FillCArc(r: Rect;startAngle: INTEGER;arcAngle: INTEGER;pp: PixPatHandle);
  801.     INLINE $AA11;
  802. PROCEDURE FillCRgn(rgn: RgnHandle;pp: PixPatHandle);
  803.     INLINE $AA12;
  804. PROCEDURE FillCPoly(poly: PolyHandle;pp: PixPatHandle);
  805.     INLINE $AA13;
  806. PROCEDURE RGBForeColor(color: RGBColor);
  807.     INLINE $AA14;
  808. PROCEDURE RGBBackColor(color: RGBColor);
  809.     INLINE $AA15;
  810. PROCEDURE SetCPixel(h: INTEGER;v: INTEGER;cPix: RGBColor);
  811.     INLINE $AA16;
  812. PROCEDURE SetPortPix(pm: PixMapHandle);
  813.     INLINE $AA06;
  814. PROCEDURE GetCPixel(h: INTEGER;v: INTEGER;VAR cPix: RGBColor);
  815.     INLINE $AA17;
  816. PROCEDURE GetForeColor(VAR color: RGBColor);
  817.     INLINE $AA19;
  818. PROCEDURE GetBackColor(VAR color: RGBColor);
  819.     INLINE $AA1A;
  820. PROCEDURE SeedCFill(srcBits: BitMap;dstBits: BitMap;srcRect: Rect;dstRect: Rect;
  821.     seedH: INTEGER;seedV: INTEGER;matchProc: ProcPtr;matchData: LONGINT);
  822.     INLINE $AA50;
  823. PROCEDURE CalcCMask(srcBits: BitMap;dstBits: BitMap;srcRect: Rect;dstRect: Rect;
  824.     seedRGB: RGBColor;matchProc: ProcPtr;matchData: LONGINT);
  825.     INLINE $AA4F;
  826. PROCEDURE OpColor(color: RGBColor);
  827.     INLINE $AA21;
  828. PROCEDURE HiliteColor(color: RGBColor);
  829.     INLINE $AA22;
  830. PROCEDURE DisposCTable(cTable: CTabHandle);
  831.     INLINE $AA24;
  832. FUNCTION GetCTable(ctID: INTEGER): CTabHandle;
  833.     INLINE $AA18;
  834. FUNCTION GetCCursor(crsrID: INTEGER): CCrsrHandle;
  835.     INLINE $AA1B;
  836. PROCEDURE SetCCursor(cCrsr: CCrsrHandle);
  837.     INLINE $AA1C;
  838. PROCEDURE AllocCursor;
  839.     INLINE $AA1D;
  840. PROCEDURE DisposCCursor(cCrsr: CCrsrHandle);
  841.     INLINE $AA26;
  842. FUNCTION GetCIcon(iconID: INTEGER): CIconHandle;
  843.     INLINE $AA1E;
  844. PROCEDURE PlotCIcon(theRect: Rect;theIcon: CIconHandle);
  845.     INLINE $AA1F;
  846. PROCEDURE DisposCIcon(theIcon: CIconHandle);
  847.     INLINE $AA25;
  848. PROCEDURE SetStdCProcs(VAR procs: CQDProcs);
  849.     INLINE $AA4E;
  850. PROCEDURE CharExtra(extra: Fixed);
  851.     INLINE $AA23;
  852. FUNCTION GetMaxDevice(globalRect: Rect): GDHandle;
  853.     INLINE $AA27;
  854. FUNCTION GetCTSeed: LONGINT;
  855.     INLINE $AA28;
  856. FUNCTION GetDeviceList: GDHandle;
  857.     INLINE $AA29;
  858. FUNCTION GetMainDevice: GDHandle;
  859.     INLINE $AA2A;
  860. FUNCTION GetNextDevice(curDevice: GDHandle): GDHandle;
  861.     INLINE $AA2B;
  862. FUNCTION TestDeviceAttribute(gdh: GDHandle;attribute: INTEGER): BOOLEAN;
  863.     INLINE $AA2C;
  864. PROCEDURE SetDeviceAttribute(gdh: GDHandle;attribute: INTEGER;value: BOOLEAN);
  865.     INLINE $AA2D;
  866. PROCEDURE InitGDevice(qdRefNum: INTEGER;mode: LONGINT;gdh: GDHandle);
  867.     INLINE $AA2E;
  868. FUNCTION NewGDevice(refNum: INTEGER;mode: LONGINT): GDHandle;
  869.     INLINE $AA2F;
  870. PROCEDURE DisposGDevice(gdh: GDHandle);
  871.     INLINE $AA30;
  872. PROCEDURE SetGDevice(gd: GDHandle);
  873.     INLINE $AA31;
  874. FUNCTION GetGDevice: GDHandle;
  875.     INLINE $AA32;
  876. FUNCTION Color2Index(myColor: RGBColor): LONGINT;
  877.     INLINE $AA33;
  878. PROCEDURE Index2Color(index: LONGINT;VAR aColor: RGBColor);
  879.     INLINE $AA34;
  880. PROCEDURE InvertColor(VAR myColor: RGBColor);
  881.     INLINE $AA35;
  882. FUNCTION RealColor(color: RGBColor): BOOLEAN;
  883.     INLINE $AA36;
  884. PROCEDURE GetSubTable(myColors: CTabHandle;iTabRes: INTEGER;targetTbl: CTabHandle);
  885.     INLINE $AA37;
  886. PROCEDURE MakeITable(cTabH: CTabHandle;iTabH: ITabHandle;res: INTEGER);
  887.     INLINE $AA39;
  888. PROCEDURE AddSearch(searchProc: ProcPtr);
  889.     INLINE $AA3A;
  890. PROCEDURE AddComp(compProc: ProcPtr);
  891.     INLINE $AA3B;
  892. PROCEDURE DelSearch(searchProc: ProcPtr);
  893.     INLINE $AA4C;
  894. PROCEDURE DelComp(compProc: ProcPtr);
  895.     INLINE $AA4D;
  896. PROCEDURE SubPt(src: Point;VAR dst: Point);
  897.     INLINE $A87F;
  898. PROCEDURE SetClientID(id: INTEGER);
  899.     INLINE $AA3C;
  900. PROCEDURE ProtectEntry(index: INTEGER;protect: BOOLEAN);
  901.     INLINE $AA3D;
  902. PROCEDURE ReserveEntry(index: INTEGER;reserve: BOOLEAN);
  903.     INLINE $AA3E;
  904. PROCEDURE SetEntries(start: INTEGER;count: INTEGER;aTable: CSpecArray);
  905.     INLINE $AA3F;
  906. PROCEDURE SaveEntries(srcTable: CTabHandle;resultTable: CTabHandle;VAR selection: ReqListRec);
  907.     INLINE $AA49;
  908. PROCEDURE RestoreEntries(srcTable: CTabHandle;dstTable: CTabHandle;VAR selection: ReqListRec);
  909.     INLINE $AA4A;
  910. FUNCTION QDError: INTEGER;
  911.     INLINE $AA40;
  912. FUNCTION GetMaskTable: Ptr;
  913.  
  914. {$ENDC}    { UsingQuickdraw }
  915.  
  916. {$IFC NOT UsingIncludes}
  917.     END.
  918. {$ENDC}
  919.  
  920.